/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.logicwin.RobotTravel.Screens;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.MediaController;
import android.widget.VideoView;
import com.logicwin.RobotTravel.R;

/**
 * 
 * @author chapeng
 */
public class FullScreenVideo extends Activity {

	private VideoView videoView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {	
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);			
		setContentView(R.layout.full_screen_video);
		
		videoView = (VideoView) this.findViewById(R.id.FullVideoView01);
		this.startPlay();

	}

	private void startPlay() {
		videoView.setVideoPath("/sdcard/VID.3gp");
		videoView.setMediaController(new MediaController(this));
		videoView.requestFocus();
		videoView.start();
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		videoView.pause();
	}

	@Override
	protected void onPause() {
		super.onPause();
		videoView.pause();
	}
}
